//文档加载事件
$(function () {
    var pie_china = echarts.init(document.getElementById("pie_now"), 'infographic');
    option = {
        tooltip: {
            trigger: 'item'
        },
        legend: {
            //设置纵向显示
            orient: 'vertical',
            top: '5%',
            left: 'right',
            textStyle: {color: 'balck'}
        },
        series: [
            {
                name: '今日国内疫情分析',
                type: 'pie',
                radius: ['40%', '70%'],
                avoidLabelOverlap: false,
                itemStyle: {
                    borderRadius: 10,
                    borderColor: '#fff',
                    borderWidth: 2
                },
                label: {
                    show: false,
                    position: 'center'
                },
                emphasis: {
                    label: {
                        show: true,
                        fontSize: '20',
                        fontWeight: 'bold'
                    }
                },
                labelLine: {
                    show: false
                },
                data: [
                    {name: '现有确诊', value: 11},
                    {name: '现有治愈', value: 22},
                    {name: '现有死亡', value: 33}
                ]
            }
        ]
    };
    pie_china.setOption(option);

})